home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln0286.arc
/
DEBUG1.LTG
< prev
next >
Wrap
Text File
|
1986-02-03
|
2KB
|
54 lines
Listing 1
1: /*----------------------------DEBUG.H--------------------------------------
2: * DEBUG.H This header file contains the statements necessary for the
3: * conditional compilation of debug statements, and a typedef
4: * used by the inkey() function.
5: *------------------------------------------------------------------------*/
6: extern int trace_sw; /*trace_sw is defined in debug.c*/
è 7: #define DEBUG
8: #ifdef DEBUG
9: #define GENERATE_STATEMENTS(statements) statements
10: #else
11: #define GENERATE_STATEMENTS(statements) /*empty*/
12: #endif
13: /*trace a character variable*/
14: #define TC(user_text,character_variable) \
15: GENERATE_STATEMENTS(if (trace_sw) t_c(user_text,character_variable))
16: /*trace an integer variable*/
17: #define TI(user_text,integer_variable) \
18: GENERATE_STATEMENTS(if (trace_sw) t_i(user_text,integer_variable))
19: /*trace a long variable*/
20: #define TL(user_text,long_variable) \
21: GENERATE_STATEMENTS(if (trace_sw) t_l(user_text,long_variable))
22: /*trace an unsigned variable*/
23: #define TU(user_text,unsign_variable) \
24: GENERATE_STATEMENTS(if (trace_sw) t_u(user_text,unsign_variable))
25: /*trace a double variable*/
26: #define TD(user_text,double_variable) \
27: GENERATE_STATEMENTS(if (trace_sw) t_d(user_text,double_variable))
28: /*trace a float variablle*/
29: #define TF(user_text,float_variable) \
30: GENERATE_STATEMENTS(if (trace_sw) t_f(user_text,float_variable))
31: /*trace a string variable*/
32: #define TS(user_text,string_variable) \
33: GENERATE_STATEMENTS(if (trace_sw) t_s(user_text,string_variable))
34: typedef struct /*structure used by the inkey() keyboard function*/
35: {
36: char char1; /*inkey() returns a character, or zero into this field*/
37: char char2; /*if char1 is zero, inkey() returns the extended code here*/
38: }TKB;
39: /*----------------------------END DEBUG.H--------------------------------*/